package cn.imnu.legalaid.service;

import cn.imnu.legalaid.dto.User.PublicUserInfoDTO;
import cn.imnu.legalaid.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 18498
* @description 针对表【users(用户表)】的数据库操作Service
* @createDate 2025-09-19 17:49:09
*/
public interface UserService extends IService<User> {

    User getUserByUsername(String username);

    void updateLastLogin(Integer id);

    User getUserByEmail(String email);

    boolean createUser(User user);
    
    // 新增公开信息相关方法
    /**
     * 获取单个用户的公开信息
     */
    PublicUserInfoDTO getPublicUserInfo(Integer userId);
    
    /**
     * 批量获取用户的公开信息
     */
    List<PublicUserInfoDTO> getPublicUserInfoBatch(List<Integer> userIds);
    
    /**
     * 获取律师列表的公开信息
     */
    List<PublicUserInfoDTO> getPublicLawyersInfo(Integer page, Integer size, String specialty);
}
